home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
BARNET
/
COMPILER
/
SATHER
/
!Sather
/
Library
/
System
/
config
/
time
< prev
Wrap
Text File
|
1996-06-22
|
826b
|
43 lines
#ifndef TIME_CONFIG
#define TIME_CONFIG
#ifdef PP
#undef PP
#endif
#ifdef APP
#undef APP
#endif
#ifdef VPP
#undef VPP
#endif
#ifdef FPP
#undef FPP
#endif
#ifdef VSTD
#undef VSTD
#endif
#define PP no_pre,no_post
#define VPP volatile,PP
#define VSTD var "@r $$;"
TIME_SECONDS: VPP,VSTD,exec "$$=(FLTD)time(NULL);" "$$";
TIMES_NOW: VPP,declare "#include <sys/times.h>" "#include <limits.h>",
var "struct tms $$;",
exec "$0->$.wall_time=times(&$$);"
"$0->$.sys_time=$$.tms_stime;"
"$0->$.user_time=$$.tms_utime;"
"$0->$.child_sys_time=$$.tms_cstime;"
"$0->$.child_user_time=$$.tms_cutime;";
TIMES_CLK: PP,VSTD,exec "$$=CLK_TCK;",declare "#include <limits.h>";
MEMORY_NOW: PP,exec "$0->$.sbrk_size=(long)sbrk(0);"
"$0->$.gc_size=(long)GC_get_heap_size();";
#endif